
import numpy as np
import matplotlib.pyplot as plt

def plot():
    x = np.arange(-np.pi, np.pi, 0.01)
    y = np.sin(x)
    plt.title("sin(x)")

    plt.figure(1, figsize=(10,10))
    #plt.plot(x,y,"r.",ls='-',lw=2, label="sin(x)")
    plt.plot(x, y, c='r', ls='--', lw='1', label='sin(x)')

    plt.xlim(-3.5, 3.5)
    plt.ylim(-1.2, 1.2)

    #plt.axhline(y=0,color='green', lw=2,label='分割线')
    plt.axhline()
    #plt.axvline(x=0,color='green', lw=2,label='分割线')
    plt.axvline()

    plt.xticks(list(range(-4, 4, 1)))

    plt.show()


def main():
    plot()

if __name__ == "__main__":
    main()